<?php 
	$i=1;
	
	while($i < $item['levels'])
	{
		$nextLevel = '';
		for($j=0; $j<4; $j++)
		{
			if($j == 0) 
			{ 
				$nextLevel = '<ul>'; 
				$nextLevel .= '<li class="level_'.$i.'"><a class="level_'.$i.' first" href="#"><h2><span><div>Subitem '.$j.' First</div></span></h2></a></li>'; 
				$nextLevel .= '<li class="level_'.$i.'"><a class="level_'.$i.' active" href="#"><h2><span><div>Subitem '.$j.' (Active)</div></span></h2></a></li>'; 
			} 
			$nextLevel .= '<li class="level_'.$i.'"><a class="level_'.$i.'" href="#"><h2><span><div>Subitem '.$j.'</div></span></h2></a></li>'; 
			if($j == 3) 
			{ 
				$nextLevel .= '<li class="level_'.$i.'"><a class="level_'.$i.' last" href="#"><h2><span><div>Subitem '.$j.' Last</div></span></h2></a></li>'; 
				$nextLevel .= '</ul>'; 
			} 
		}
		$i ++;
	}
	
	if($item['type'] == 4)
	{ 
		$nextLevel2 = $nextLevel; 
		$nextLevel = '';
	}
?>
<div class="com_menus type_<?php echo $item['type']; ?>">
	<div class="cm_<?php echo $item['id']; ?>">
        <ul> 
            <li class="level_0"><a class="level_0 first" href="#"><span class="m_bg_left"><span class="m_bg_right">Home</span></span></a></li> 
            <li class="level_0"><a class="level_0 active" href="#"><span class="m_bg_left"><span class="m_bg_right">About (Active)</span></span></a></li> 
            <li class="level_0"><a class="level_0" href="#"><span class="m_bg_left"><span class="m_bg_right">Services</span></span></a></li> 
            <li class="level_0"><a class="level_0 last" href="#"><span class="m_bg_left"><span class="m_bg_right">Contact Us</span></span></a></li> 
        </ul>
    </div>
    <?php if($item['type'] == 4): ?>
    <div class="cm_<?php echo $item['id']; ?>" style="clear:left;">
        <ul> 
            <li class="level_1"><a class="level_1 first" href="#"><span class="m_bg_left"><span class="m_bg_right">Home</span></span></a></li> 
            <li class="level_1"><a class="level_1 active" href="#"><span class="m_bg_left"><span class="m_bg_right">About (Active)</span></span></a></li> 
            <li class="level_1"><a class="level_1" href="#"><span class="m_bg_left"><span class="m_bg_right">Services</span></span></a></li> 
            <li class="level_1"><a class="level_1 last" href="#"><span class="m_bg_left"><span class="m_bg_right">Contact Us</span></span></a></li> 
        </ul>
    </div>
    <?php endif; ?>
</div>
<?php //print_r($item); ?>
<br clear="both" />
<input type="hidden" name="action" value="editor" />
<input type="hidden" name="item" value="<?php echo $item['id']; ?>" />
<input type="hidden" id="add_first" name="add_first" value="0" />
<input type="hidden" id="add_last" name="add_last" value="0" />
<input type="hidden" id="add_level" name="add_level" value="0" />
<input type="hidden" id="delete_level" name="delete_level" value="0" />
<?php if($item['level'] > 0): ?>
<input type="hidden" name="levels" value="<?php echo $item['levels']; ?>" />
<input type="hidden" name="type" value="<?php echo $item['type']; ?>" />
<?php endif; ?>
<fieldset>
	<dl>
		<dt>Name:</dt>
		<dd>
			<input name="name" type="text" value="<?php echo $item['name']; ?>" style="width:30%">
			&nbsp;<?php echo $NameStatus; ?>
			<input type="submit" value="Save" style="padding-left:20px; padding-right:10px;  background-image: url('../images/system/save.gif'); border:1px solid #DDDDDD; height:20px;" class="buttons">
            
            
		</dd>
	</dl>
    <?php if($item['level'] == 0): ?>
    <dl>
		<dt>Type:</dt>
		<dd>
			<select name="type" onchange="submit();" style="width:224px;">
            	<option value="0" <?php if($item['type'] == 0) { echo 'selected'; } ?>>Horisontal (CSS)</option>
                <option value="2" <?php if($item['type'] == 2) { echo 'selected'; } ?>>Horisontal Dropdown (CSS-JS)</option>
                <option value="4" <?php if($item['type'] == 4) { echo 'selected'; } ?>>Horisontal Double (CSS-JS)</option>
                <option value="1" <?php if($item['type'] == 1) { echo 'selected'; } ?>>Vertical (CSS)</option>
                <option value="3" <?php if($item['type'] == 3) { echo 'selected'; } ?>>Vertical Dropdown (CSS-JS)</option>
			</select>
		</dd>
	</dl>
    <dl>
		<dt>Levels:</dt>
		<dd>
			<select disabled="disabled" name="levels" style="width:224px;" onchange="return;">
            	<option value="1" <?php if($item['levels'] == 1) { echo 'selected'; } ?>>1</option>
				<?php 
					if($item['type'] > 1)
					{
						$i=2;
						while($i <= 10)
						{
							if ($i == (getMenuTopLevel($item['id']) + 1))
							{ echo '<option value="'.$i.'" selected>'.$i.'</option>'; }
							else
							{ echo '<option value="'.$i.'">'.$i.'</option>'; }
							$i ++;
						}
					}
				?>
			</select>
            <?php if($item['type'] > 1): ?>
            <input type="button" onmousedown="document.getElementById('add_level').value=1; submit();" value="Add Level" style="padding-left:20px; padding-right:10px;  background-image: url('../images/system/new.gif'); border:1px solid #DDDDDD; height:20px;" class="buttons">
            <?php endif; ?>
		</dd>
	</dl>
    <?php endif; ?>
	<dl>
		<dt>Level:</dt>
		<dd>
			<select name="level" onchange="document.location.href='?con=<?php echo $_GET['con']; ?>&cat=<?php echo $_REQUEST['cat']; ?>&item=<?php echo $item['id']; ?>&level='+this.value+'&position=<?php echo $item['position']; ?>';" style="width:224px;">
				<?php 
					for($i=0; $i<$item['levels']; $i++)
					{
						if ($i == $item['level'])
						{ echo '<option value="'.$i.'" selected>'.$i.'</option>'; }
						else
						{ echo '<option value="'.$i.'">'.$i.'</option>'; }
					}
				?>
			</select>
            <?php if(($item['level'] > 0) && ($item['level'] == getMenuTopLevel($item['id']))): ?>
            <input type="button" onmousedown="document.getElementById('delete_level').value=1; submit();" value="Delete Level" style="padding-left:20px; padding-right:10px;  background-image: url('../images/system/delete.gif'); border:1px solid #DDDDDD; height:20px;" class="buttons">
            <?php endif; ?>
		</dd>
	</dl>
    <dl>
		<dt>Position:</dt>
		<dd>
			<select name="position" onchange="document.location.href='?con=<?php echo $_GET['con']; ?>&cat=<?php echo $_REQUEST['cat']; ?>&item=<?php echo $item['id']; ?>&level=<?php echo $item['level']; ?>&position='+this.value+'';"  style="width:224px;">
            	<?php if(hasMenuPosition($item['id'], $item['level'], 0)): ?>
				<option value="0" <?php if($item['position'] == 0) { echo 'selected'; } ?>>First</option>
                <?php endif; ?>
                <option value="1" <?php if($item['position'] == 1) { echo 'selected'; } ?>>Any (Mid)</option>
                <?php if(hasMenuPosition($item['id'], $item['level'], 2)): ?>
                <option value="2" <?php if($item['position'] == 2) { echo 'selected'; } ?>>Last</option>
                <?php endif; ?>
			</select>
            <?php if(!hasMenuPosition($item['id'], $item['level'], 0)): ?>
            <input type="button" onmousedown="document.getElementById('add_first').value=1; submit();" value="Add First" style="padding-left:20px; padding-right:10px;  background-image: url('../images/system/new.gif'); border:1px solid #DDDDDD; height:20px;" class="buttons">
            <?php endif; ?>
            <?php if(!hasMenuPosition($item['id'], $item['level'], 2)): ?>
            <input type="button" onmousedown="document.getElementById('add_last').value=1; submit();" value="Add Last" style="padding-left:20px; padding-right:10px;  background-image: url('../images/system/new.gif'); border:1px solid #DDDDDD; height:20px;" class="buttons">
             <?php endif; ?>
		</dd>
	</dl>
    <?php 
	$i=0;
	foreach($imagenames as $imagename)
	{
	?>
	<dl>
		<dt><?php echo $imagenameLabel[$i]; ?>: <?php echo $item[$imagename]; ?></dt>
		<dd>
			<input id="<?php echo $imagename; ?>" name="<?php echo $imagename; ?>" type="file" ></input>
			<?php 
				if($item[$imagename] != "")
				{
					$size[$imagename] = getimagesize(MENU_PATH.$item[$imagename]); 
					$fp = fopen(MENU_PATH.$item[$imagename], "rb");
					if ($size && $fp) 
					{
						echo $size[$imagename][0]." x ";
						echo $size[$imagename][1]." px ";
					}
				}
				echo $error[$imagename];
			?>
			<?php if($item[$imagename] != "") { ?>
				<input type="checkbox" name="delete_<?php echo $imagename; ?>" value="1"><strong>(Delete)</strong>
			<?php } ?>
		</dd>
	</dl>
    <?php 
	$i++;
	}
	?>
	<dl>
		<dt>Edit MenuType Style</dt>
		<dd>&nbsp;</dd>
	</dl>
	<table cellpadding="0" cellspacing="0" border="1" style="cursor:pointer; width:100%; background-color:#EEEEEE; height:30px;">
		<tr>
			<td id="board_1" colspan="3" onclick="setVisible('cm_div'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">MenuType Set Container</td>
		</tr>
		<tr>
			<td id="board_2" onclick="setVisible('cm_a'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Left Bg And MenuType Margin</td>
			<td id="board_3" onclick="setVisible('cm_span'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Text Container</td>
			<td id="board_4" onclick="setVisible('cm_h2'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Right Bg</td>
		</tr>
		<tr>
			<td id="board_5" onclick="setVisible('cm_a_h'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Left Bg "Hover"</td>
			<td id="board_6" onclick="setVisible('cm_span_h'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Mid Bg And Text "Hover"</td>
			<td id="board_7" onclick="setVisible('cm_h2_h'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Right Bg "Hover"</td>
		</tr>
		<tr>
			<td id="board_8" onclick="setVisible('cm_a_active'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Left Bg "Active"</td>
			<td id="board_9" onclick="setVisible('cm_span_active'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Mid Bg And Text "Active"</td>
			<td id="board_10" onclick="setVisible('cm_h2_active'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Right Bg "Active"</td>
		</tr>
        <tr>
			<td id="board_11" onclick="setVisible('cm_a_active_hover'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Left Bg "Active Hover"</td>
			<td id="board_12" onclick="setVisible('cm_span_active_hover'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Mid Bg And Text "Active Hover"</td>
			<td id="board_13" onclick="setVisible('cm_h2_active_hover'); toggleClassName(this.id, 'board_active');" align="center" style="width:60px; border-right:1px solid #CCCCCC;">Right Bg "Active Hover"</td>
		</tr>
	</table>
	<?php $style['cm_div'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id']); ?>
    <?php $style['ul'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul'); ?>
    <?php $style['ul_li'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li'); ?>
    <?php $style['ul_li_ul'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li ul'); ?>
    <?php $style['ul_li_ul_li'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li ul li'); ?>
    <?php $style['ul_li_h_ul'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li:hover ul'); ?>
    <?php $style['ul_li_h_ul_li'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li:hover ul li'); ?>
    
	<dl id="cm_div" style="display:none;">
		<dt>div.cm_<?php echo $item['id']; ?></dt>
		<dd>
			<textarea name="cm_div" style="width:50%; height:120px;"><?php echo $style['cm_div']; ?></textarea>
		</dd>
        <dt>div.cm_<?php echo $item['id']; ?> ul</dt>
		<dd>
			<textarea name="ul" style="width:50%; height:120px;"><?php echo $style['ul']; ?></textarea>
		</dd>
        <dt>div.cm_<?php echo $item['id']; ?> ul li</dt>
		<dd>
			<textarea name="ul_li" style="width:50%; height:120px;"><?php echo $style['ul_li']; ?></textarea>
		</dd>
        <dt>div.cm_<?php echo $item['id']; ?> ul li ul</dt>
		<dd>
			<textarea name="ul_li_ul" style="width:50%; height:120px;"><?php echo $style['ul_li_ul']; ?></textarea>
		</dd>
        <dt>div.cm_<?php echo $item['id']; ?> ul li ul li</dt>
		<dd>
			<textarea name="ul_li_ul_li" style="width:50%; height:120px;"><?php echo $style['ul_li_ul_li']; ?></textarea>
		</dd>
        <dt>div.cm_<?php echo $item['id']; ?> ul li:hover ul</dt>
		<dd>
			<textarea name="ul_li_h_ul" style="width:50%; height:120px;"><?php echo $style['ul_li_h_ul']; ?></textarea>
		</dd>
        <dt>div.cm_<?php echo $item['id']; ?> ul li:hover ul li</dt>
		<dd>
			<textarea name="ul_li_h_ul_li" style="width:50%; height:120px;"><?php echo $style['ul_li_h_ul_li']; ?></textarea>
		</dd>
	</dl>
	<?php 
	$style['cm_a'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'');
	if($style['cm_a'] == '')
	{ 
		if($item['l_image'] != '')
		{ $style['cm_a'] = 'padding-left:'.$size['l_image'][0].'px; background:transparent url(images/'.$item['l_image'].') no-repeat scroll left top;'; }
	}
	?>
	<dl id="cm_a" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?></dt>
		<dd>
			<textarea name="cm_a" style="width:50%; height:120px;"><?php echo $style['cm_a']; ?></textarea>
		</dd>
	</dl>
	
	<?php 
	$style['cm_a_h'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.':hover');
	if($style['cm_a_h'] == '')
	{ 
		if($item['l_image_h'] != '')
		{ $style['cm_a_h'] = 'background-image:url(images/'.$item['l_image_h'].');'; }
	}
	?>
	<dl id="cm_a_h" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>:hover</dt>
		<dd>
			<textarea name="cm_a_h" style="width:50%; height:120px;"><?php echo $style['cm_a_h']; ?></textarea>
		</dd>
	</dl>
	
	<?php 
	$style['cm_a_active'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'.active');
	if($style['cm_a_active'] == '')
	{ 
		if($item['l_image_a'] != '')
		{ $style['cm_a_active'] = 'background-image:url(images/'.$item['l_image_a'].');'; }
	}
	?>
	<dl id="cm_a_active" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>.active</dt>
		<dd>
			<textarea name="cm_a_active" style="width:50%; height:120px;"><?php echo $style['cm_a_active']; ?></textarea>
		</dd>
	</dl>
	
    <?php 
	$style['cm_a_active_hover'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'.active:hover'); 
	?>
	<dl id="cm_a_active_hover" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>.active:hover</dt>
		<dd>
			<textarea name="cm_a_active_hover" style="width:50%; height:120px;"><?php echo $style['cm_a_active_hover']; ?></textarea>
		</dd>
	</dl>
    
	<?php 
	$style['cm_h2'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.' h2');
	if($style['cm_h2'] == '')
	{ 
		if($item['r_image'] != '')
		{ 
			
			$style['cm_h2'] = $style['cm_h2'].' padding-right:'.$size['r_image'][0].'px;  background:transparent url(images/'.$item['r_image'].') no-repeat scroll right top;'; 
		}
	}
	?>
	<dl id="cm_h2" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?> h2</dt>
		<dd>
			<textarea name="cm_h2" style="width:50%; height:120px;"><?php echo $style['cm_h2']; ?></textarea>
		</dd>
	</dl>
	
	<?php 
	$style['cm_h2_h'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.':hover h2');
	if($style['cm_h2_h'] == '')
	{ 
		if($item['r_image_h'] != '')
		{ 
			$style['cm_h2_h'] = 'background-image:url(images/'.$item['r_image_h'].');'; 
		}
	}
	?>
	<dl id="cm_h2_h" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>:hover h2</dt>
		<dd>
			<textarea name="cm_h2_h" style="width:50%; height:120px;"><?php echo $style['cm_h2_h']; ?></textarea>
		</dd>
	</dl>
	<?php 
	$style['cm_h2_active'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'.active h2');
	if($style['cm_h2_active'] == '')
	{ 
		if($item['r_image_active'] != '')
		{ 
			$style['cm_h2_active'] = 'background-image:url(images/'.$item['r_image_h'].');'; 
		}
	}
	?>
	<dl id="cm_h2_active" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>.active h2</dt>
		<dd>
			<textarea name="cm_h2_active" style="width:50%; height:120px;"><?php echo $style['cm_h2_active']; ?></textarea>
		</dd>
	</dl>
	
    <?php 
	$style['cm_h2_active_hover'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'.active:hover h2');
	?>
	<dl id="cm_h2_active_hover" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>.active:hover h2</dt>
		<dd>
			<textarea name="cm_h2_active_hover" style="width:50%; height:120px;"><?php echo $style['cm_h2_active_hover']; ?></textarea>
		</dd>
	</dl>
    
	<?php 
	$style['cm_span'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.' h2 span');
	if($style['cm_span'] == '')
	{ 
		if($item['bg_image'] != '')
		{ 
			$style['cm_span'] = ' height:'.$size['bg_image'][1].'px; ';
			$style['cm_span'] = $style['cm_span'].' background:transparent url(images/'.$item['bg_image'].') repeat-x scroll left top;'; 
		}
	}
	
	$style['cm_span_div'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.' h2 span div');	
	?>
	<dl id="cm_span" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?> h2 span</dt>
		<dd>
			<textarea name="cm_span" style="width:50%; height:120px;"><?php echo $style['cm_span']; ?></textarea>
		</dd>
        
        <dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?> h2 span div</dt>
		<dd>
			<textarea name="cm_span_div" style="width:50%; height:120px;"><?php echo $style['cm_span_div']; ?></textarea>
		</dd>
	</dl>
	<?php 
	$style['cm_span_h'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.':hover h2 span');
	if($style['cm_span_h'] == '')
	{ 
		if($item['bg_image_h'] != '')
		{ 
			$style['cm_span_h'] = 'background-image:url(images/'.$item['bg_image_h'].');'; 
		}
	}
	$style['cm_span_div_h'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.':hover h2 span div');	
	?>
	<dl id="cm_span_h" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>:hover h2 span</dt>
		<dd>
			<textarea name="cm_span_h" style="width:50%; height:120px;"><?php echo $style['cm_span_h']; ?></textarea>
		</dd>
        <dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>:hover h2 span div</dt>
		<dd>
			<textarea name="cm_span_div_h" style="width:50%; height:120px;"><?php echo $style['cm_span_div_h']; ?></textarea>
		</dd>
	</dl>
	<?php 
	$style['cm_span_active'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'.active h2 span');
	if($style['cm_span_active'] == '')
	{ 
		if($item['bg_image_a'] != '')
		{ 
			$style['cm_span_active'] = 'background-image:url(images/'.$item['bg_image_a'].');'; 
		}
	}
	$style['cm_span_div_active'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'.active h2 span div');	
	?>
	<dl id="cm_span_active" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>.active h2 span</dt>
		<dd>
			<textarea name="cm_span_active" style="width:50%; height:120px;"><?php echo $style['cm_span_active']; ?></textarea>
		</dd>
        <dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>.active h2 span div</dt>
		<dd>
			<textarea name="cm_span_div_active" style="width:50%; height:120px;"><?php echo $style['cm_span_div_active']; ?></textarea>
		</dd>
	</dl>
    
    <?php 
	$style['cm_span_active_hover'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'.active:hover h2 span');
	$style['cm_span_div_active_hover'] = getStyleCss(7, $item['id'], 'div.com_menus div.cm_'.$item['id'].' ul li a'.$levadd.$posadd.'.active:hover h2 span div');	
	?>
	<dl id="cm_span_active_hover" style="display:none;">
		<dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>.active:hover h2 span</dt>
		<dd>
			<textarea name="cm_span_active_hover" style="width:50%; height:120px;"><?php echo $style['cm_span_active_hover']; ?></textarea>
		</dd>
        <dt>div.com_menus div.cm_<?php echo $item['id']; ?> ul li a<?php echo $levadd.$posadd; ?>.active:hover h2 span div</dt>
		<dd>
			<textarea name="cm_span_div_active_hover" style="width:50%; height:120px;"><?php echo $style['cm_span_div_active_hover']; ?></textarea>
		</dd>
	</dl>
    
	<dl>
		<dt>Header Categories:</dt>
		<dd>
			<select size="10" name="hfb_cats" style="width:20%;">
				<?php 
				if($hfbcats)
				{
					foreach($hfbcats as $hfbcat)
					{
						echo '<option ondblclick="edit_form.add_to_cat.value=this.value; edit_form.submit();" value="'.$hfbcat['id'].'">'.$hfbcat['title'].'</option>';
					}
				}
				?>
			</select>
			<select size="10" name="hfb_in_cats" style="width:20%;">
				<?php 
				if($incats)
				{
					foreach($incats as $incat)
					{
						echo '<option ondblclick="edit_form.rem_from_cat.value=this.value; edit_form.submit();" value="'.$incat['id'].'">'.$incat['title'].'</option>';
					}
				}
				?>
			</select>
			<input type="hidden" id="add_to_cat" name="add_to_cat" value="0" />
			<input type="hidden" id="rem_from_cat" name="rem_from_cat" value="0" />
		</dd>
	</dl>
</fieldset>